Use machine_halt() where it makes sense, to halt all processors
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 6 Apr 2006 15:41:53 +0000 (16:41 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 6 Apr 2006 15:41:53 +0000 (16:41 +0100)
rather than just the current one.

Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/shutdown.c
xen/arch/x86/traps.c
xen/arch/x86/x86_32/traps.c
xen/arch/x86/x86_64/traps.c
xen/drivers/char/console.c

index e3cd61085a24a86702910e70aa195e5a597c590a..97b41a94caf5841fba8ad1b14f769a57311c35e4 100644 (file)
@@ -44,7 +44,7 @@ static inline void kb_wait(void)
 void __attribute__((noreturn)) __machine_halt(void *unused)
 {
     for ( ; ; )
-        safe_halt();
+        __asm__ __volatile__ ( "hlt" );
 }
 
 void machine_halt(void)
index 2856f75a0c3b1ba0eb5c80689a979d089efaa359..72272f30ca90406304ebd1b84aa2f97b1e0b5754 100644 (file)
@@ -32,6 +32,7 @@
 #include <xen/errno.h>
 #include <xen/mm.h>
 #include <xen/console.h>
+#include <xen/reboot.h>
 #include <asm/regs.h>
 #include <xen/delay.h>
 #include <xen/event.h>
@@ -318,8 +319,7 @@ asmlinkage void fatal_trap(int trapnr, struct cpu_user_regs *regs)
     console_force_lock();
 
     /* Wait for manual reset. */
-    for ( ; ; )
-        __asm__ __volatile__ ( "hlt" );
+    machine_halt();
 }
 
 static inline int do_trap(int trapnr, char *str,
index f0dc66182161a2b8d708ded38d8d11b3e9d99cdb..d99fecdae9f5fe3b397e122afa965ce8539822c7 100644 (file)
@@ -9,6 +9,7 @@
 #include <xen/mm.h>
 #include <xen/irq.h>
 #include <xen/symbols.h>
+#include <xen/reboot.h>
 #include <asm/current.h>
 #include <asm/flushtlb.h>
 #include <asm/hvm/hvm.h>
@@ -180,8 +181,7 @@ asmlinkage void do_double_fault(void)
     console_force_lock();
 
     /* Wait for manual reset. */
-    for ( ; ; )
-        __asm__ __volatile__ ( "hlt" );
+    machine_halt();
 }
 
 unsigned long do_iret(void)
index fcc188364b269d79ea2f944314cbefbd255c63a3..f7dd3e939f15f71f9e8f4e40df4c4c98bc4e2852 100644 (file)
@@ -10,6 +10,7 @@
 #include <xen/symbols.h>
 #include <xen/console.h>
 #include <xen/sched.h>
+#include <xen/reboot.h>
 #include <asm/current.h>
 #include <asm/flushtlb.h>
 #include <asm/msr.h>
@@ -166,8 +167,7 @@ asmlinkage void do_double_fault(struct cpu_user_regs *regs)
     console_force_lock();
 
     /* Wait for manual reset. */
-    for ( ; ; )
-        __asm__ __volatile__ ( "hlt" );
+    machine_halt();
 }
 
 void toggle_guest_mode(struct vcpu *v)
index df4706bcb2beb6ca14f00fc3dbf11485b7125666..948000c7439e9449911b0f144909776440155a98 100644 (file)
@@ -520,6 +520,7 @@ void console_force_unlock(void)
 {
     console_lock = SPIN_LOCK_UNLOCKED;
     serial_force_unlock(sercon_handle);
+    console_start_sync();
 }
 
 void console_force_lock(void)